<?php
$db=new PDO(dsn:'mysql:host=localhost;dbname=chengyu',username:'root',password:'12qwas');
$r=$db->query(query:"select cy as 成语, first 首字 from chengyu limit 2");
foreach($r as $row){
    print_r($row);
}